#include "InOut.h"

InOut::InOut() : id(0), position(0), roadSign(0),crossRoad(0),lane(0) {}

InOut::InOut (int id, float x, float y,RoadSign* rs, int cr, int l) {
    this->id=id;
    this->position = new Coord(x,y);
    this->roadSign = rs;
	this->crossRoad = cr;
	this->lane = l;
}

int InOut::getId() const {
    return this->id;
}

void InOut::setId(int id) {
    this->id = id;
}

RoadSign* InOut::getRoadSign() const {
    return this->roadSign;
}

void InOut::setRoadSign(RoadSign* rs) {
    this->roadSign=rs;
}

int InOut::getCrossRoad() const {
    return this->crossRoad;
}

void InOut::setCrossRoad(int cr) {
    this->crossRoad=cr;
}

int InOut::getLane() const {
    return this->lane;
}

void InOut::setLane(int l) {
    this->lane=l;
}

Coord* InOut::getPosition() const {
    return this->position;
}

void InOut::setPosition(Coord* position) {
    this->position = position;
}

void InOut::toString() {

    cout << "   InOut : " << this->id;
    this->position->toString();

    if (roadSign != 0){
        cout << " RS_ID : " << this->roadSign;
    }
	cout << "Associated Lane : " << this->lane << endl;
	cout << "Associated CrossRoad : " << this->crossRoad << endl;
    cout << endl;
}